Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model(cdc): add a function to recover TiDB TableInfo #7480

Merged
merged 4 commits into from
Nov 3, 2022

Conversation

lance6716
Copy link
Contributor

@lance6716 lance6716 commented Oct 28, 2022

What problem does this PR solve?

Issue Number: ref #3242, a part of #4587

What is changed and how it works?

after recover TiDB TableInfo from CDC's redo log or RowChangedEvent, we can use sqlmodel and generate DML in the same way as DM

Check List

Tests

  • Unit test

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

`None`.

Signed-off-by: lance6716 <lance6716@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 28, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • asddongmen
  • zhaoxinyu

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 28, 2022
@lance6716 lance6716 requested a review from asddongmen October 28, 2022 09:04
" c3 BIT(10) NOT NULL," +
" UNIQUE KEY (c2, c3)" +
")",
// CDC discards field length, charset and collation.
Copy link
Contributor Author

@lance6716 lance6716 Oct 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discard field length will cause correctness problem like #3286

Signed-off-by: lance6716 <lance6716@gmail.com>
@lance6716
Copy link
Contributor Author

ptal @asddongmen

@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2022

Codecov Report

Merging #7480 (6350b95) into master (f4754e1) will increase coverage by 0.0773%.
The diff coverage is 3.7037%.

Additional details and impacted files
Flag Coverage Δ
cdc 67.6647% <0.0000%> (+0.2171%) ⬆️
dm 51.9831% <ø> (-0.0251%) ⬇️
engine 60.9179% <11.1111%> (-0.0507%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@               Coverage Diff                @@
##             master      #7480        +/-   ##
================================================
+ Coverage   59.8150%   59.8923%   +0.0773%     
================================================
  Files           803        802         -1     
  Lines         92129      92182        +53     
================================================
+ Hits          55107      55210       +103     
+ Misses        32213      32158        -55     
- Partials       4809       4814         +5     

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 1, 2022
indexInfo.Columns = append(indexInfo.Columns, indexCol)
}

// TODO: revert the "all column set index related flag" to "only the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this TODO item need to be done in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I'll test if this reversion is really needed in future PR

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 3, 2022
@lance6716
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 6350b95

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 3, 2022
@ti-chi-bot ti-chi-bot merged commit f82ff66 into pingcap:master Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants